﻿#ifndef LISTPUSHBUTTON_H
#define LISTPUSHBUTTON_H

#include <QPushButton>
#include <QMenu>

class ListPushButton : public QPushButton
{
    Q_OBJECT
public:
    explicit ListPushButton(QWidget *parent = nullptr);

    void setMenuItemsLabel(QStringList labels);

    void setCheckedState(QList<bool> checkedState);

signals:
    void menuItemClicked(int index, bool checked);

public slots:
    void showMenu();

private:
    QMenu menu;
    QList<QAction*> actions;
};

#endif // LISTPUSHBUTTON_H
